package com.hy.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.hy.entity.GazetteerEntity;

@Repository
public interface GazetteerJpaRepo extends JpaRepository<GazetteerEntity, String>, JpaSpecificationExecutor<GazetteerEntity>{

	@Query("select e from GazetteerEntity e where e.guid=?1")
	GazetteerEntity findById(String guid);

	@Query("select e from GazetteerEntity e where e.code=?1")
	GazetteerEntity findByCode(String code);
}
